import { computed, makeAutoObservable } from "mobx";

class UseStore {
  userinfo = [];
  constructor() {
    makeAutoObservable(this, {
      fillterList: computed,
    });
  }
  get fillterList() {
    return this.userinfo.filter((item) => item.name.includes("Alina"));
  }
  addUse = () => {
    this.userinfo.push({ name: "Alina", age: 25, address: "Beijing" });
  };
}

export default UseStore;
